<template>
  <j-modal
    :title='title'
    :width='800'
    :visible='visible'
    :maskClosable='false'
    :ok-button-props='{ props: { disabled: disableSubmit } }'
    :fullscreen='true'
    @close='close'
    cancelText='关闭'>
    <template slot='footer'>
      <a-button key='back' style='padding-left:8px;padding-right:8px' @click='close(false)'>
        关闭
      </a-button>
    </template>
    <a-spin :spinning='Loading'>
      <div :class='{isCheck:isCheck}'>
<!--        <div class='table-header'>-->
<!--          <span class='table-title'>填报单位：</span>{{  }}-->
<!--          <span class='table-title'>审计负责人：</span>{{  }}-->
<!--          <span class='table-title'>填表人：</span>{{  }}-->
<!--          <span class='table-title'>填表时间：</span>{{  }}-->
<!--          <span class='table-title'>统计时间：</span>{{  }}年（{{  }}季度）-->
<!--        </div>-->
        <a-table
          class='edit-list'
          ref='table'
          size='middle'
          bordered
          width='100vw'
          :pagination='ipagination'
          :columns='columns'
          :loading="loading"
          :dataSource='dataSource'
           @change="handleTableChange"
          :scroll='{x:250, y: 520 }'>
        </a-table>
      </div>
    </a-spin>

  </j-modal>
</template>
<script>
import columns from './columns'
import {JeecgListMixin} from '@/mixins/JeecgListMixin'
export default {
  name: 'CheckAndEditModel',
  mixins: [JeecgListMixin],
  components: {

  },
  data() {
    return {
      columns: columns(this),
      queryParam: {},
      Loading: false,
      visible: false,
      isCheck: false,
      disableSubmit: false,
      title: '凭证',
      url: {
        list: '/sjyzzx/sjZxzyAccountVouche/queryVoucheDetailByCondition',
      },
      disableMixinCreated: true
    }
  },
  created() {
  },
  methods: {
    check(record) {
      this.queryParam = record
      this.columns = columns(this)
      this.columns[1].title = record.assistTypeText + '编号'
      this.columns[2].title = record.assistTypeText + '名称'
      this.loadData(1)
      this.visible = true
    },
    close () {
      this.$emit('close');
      this.visible = false;
    },
  }
}
</script>

<style lang='less' scoped>
@import '../../../../css/checkAndEdit.less';

.table-header {
  margin-bottom: 10px;

  .table-title {
    font-weight: bold;
    margin-left: 15px;
  }
}
</style>
